package datastructure;


public class TreeTest {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		LinkTree<String> treeRoot = new LinkTree<String>("Node:treeRoot");
		LinkTree<String> treeRoot_1 = new LinkTree<String>("treeRoot_1");
		LinkTree<String> treeRoot_2 = new LinkTree<String>("treeRoot_2");
		LinkTree<String> treeRoot_1_1 = new LinkTree<String>("treeRoot_1_1");
		LinkTree<String> treeRoot_1_2 = new LinkTree<String>("treeRoot_1_2");
		LinkTree<String> treeRoot_1_3 = new LinkTree<String>("treeRoot_1_3");
		LinkTree<String> treeRoot_2_1 = new LinkTree<String>("treeRoot_2_1");
		treeRoot.addChild(treeRoot_1);
		treeRoot.addChild(treeRoot_2);
		treeRoot_1.addChild(treeRoot_1_1);
		treeRoot_1.addChild(treeRoot_1_2);
		treeRoot_1.addChild(treeRoot_1_3);
		treeRoot_2.addChild(treeRoot_2_1);
		treeRoot_1_1.addChild(new LinkTree<String>("treeRoot_1_1_1"));
		LinkTree<String> treeRoot_2_1_1 = new LinkTree<String>("treeRoot_2_1_1");
		treeRoot_2_1.addChild(treeRoot_2_1_1);
		treeRoot_2_1_1.addChild(new LinkTree<String>("treeRoot_2_1_1_1"));
		treeRoot.traverse();
		treeRoot.getDeep();
		System.out.println("deep is "+treeRoot.getDeep());
		System.out.println("count is"+treeRoot.getNodesCount());
		treeRoot.breadedTraverser();

	}

}
